package com.example.crawler.youtube.model.third;

import java.util.Arrays;
import java.util.List;

public class PriorityFilter {
    private boolean hasAudio;
    private String quality;
    private Integer itag;

    private PriorityFilter(boolean hasAudio, String quality, Integer itag) {
        this.hasAudio = hasAudio;
        this.quality = quality;
        this.itag = itag;
    }

    public boolean isHasAudio() {
        return hasAudio;
    }

    public String getQuality() {
        return quality;
    }

    public Integer getItag() {
        return itag;
    }

    /**
     * 获取视频优先的清晰度排序
     *
     * @return
     */
    public static List<PriorityFilter> getFilter() {
        return Arrays.asList(
                new PriorityFilter(true, "360p", 18),
                new PriorityFilter(true, "720p", 22)
        );
    }
}
